<div
    bsModal
    #createOrEditModal="bs-modal"
    class="modal fade"
    tabindex="-1"
    role="dialog"
    aria-labelledby="createOrEditModal"
    aria-hidden="true"
    [config]="{ backdrop: 'static' }"
>
    <div class="modal-dialog modal-xxl">
        <div class="modal-content">
            <form
                *ngIf="active"
                #editForm="ngForm"
                novalidate
                (ngSubmit)="save()"
                autocomplete="off"
            >
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span *ngIf="editDto?.id">编辑</span>
                        <span *ngIf="!editDto?.id">创建</span>
                    </h4>
                    <button
                        type="button"
                        class="close"
                        (click)="close()"
                        [attr.aria-label]="l('Close')"
                    >
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-header">
                    <div
                        class="float-left"
                        style="min-width: 270px;margin-left:10px;"
                    >
                        <label
                            for="f_WarehouseCode"
                            class="float-left"
                            style="padding-top: 6px;"
                            >库房:
                        </label>
                        <camc-dropdown
                            class="float-left"
                            id="f_WarehouseCode"
                            [options]="roomOption"
                            name="table"
                            [(ngModel)]="f_Warehouse"
                            [style]="{
                                width: '220px',
                                margin: '0 10px',
                                border: 'none'
                            }"
                            placeholder="请选择库房"
                            (onChange)="getStorage()"
                        >
                        </camc-dropdown>
                    </div>

                    <div
                        class="float-left"
                        style="min-width: 270px;margin-left:10px;"
                    >
                        <label
                            for="f_StorageAreaCode"
                            class="float-left"
                            style="padding-top: 6px;"
                            >库位:
                        </label>
                        <camc-dropdown
                            class="float-left"
                            id="f_StorageAreaCode"
                            [options]="f_StorageAreaCodeOption"
                            name="tabledd"
                            [(ngModel)]="f_StorageArea"
                            [style]="{
                                width: '220px',
                                margin: '0 10px',
                                border: 'none'
                            }"
                            placeholder="请选择库位"
                            (onChange)="getAreaInfo()"
                            [filter]="true"
                        >
                        </camc-dropdown>
                    </div>
                </div>

                <div class="modal-body">
                    <dto-extend-edit
                        #dtoExtendEdit
                        [attrs]="extensions"
                        [optionAll]="optionAll"
                        col="5"
                        [(dto)]="editDto"
                    ></dto-extend-edit>
                </div>
                <div class="modal-footer">
                    <button
                        [disabled]="saving"
                        type="button"
                        class="btn btn-default"
                        (click)="close()"
                    >
                        {{ l("Cancel") }}
                    </button>
                    <button
                        type="submit"
                        class="btn btn-primary blue"
                        [disabled]="
                            !editForm.form.valid ||
                            !dtoExtendEdit.extendForm.form.valid
                        "
                        [buttonBusy]="saving"
                        [busyText]="l('SavingWithThreeDot')"
                    >
                        <i class="fa fa-save"></i>
                        <span>{{ l("Save") }}</span>
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
